<div class="title_box">
	<div class="title_txt">{%if $act eq 'add'%}添加{%else%}修改{%/if%}调拨记录</div>
	<div class="find_bar">
		<form name="form_find" method="get" action="">
		<label class="find_name">设备自编号</label>
		<input type="text" class="input_find" maxlength="50" name="cn_name" value="{%$smarty.get.cn_name%}">
		<input type="hidden" name="allocation_id" value="{%$smarty.get.allocation_id%}">
		<input type="hidden" name="m" value="{%$smarty.get.m%}">
		<input type="hidden" name="c" value="{%$smarty.get.c%}">
		<!--<button type="submit" class="b-default" hidefocus="true"><span><em>查询</em></span></button>-->	
		<label class="find_btn" onclick="javascript:form_find.submit();"> 查询</label>
		</form>
	</div>
</div>

<form action="index.php?c=zy_allocation_log&m={%$act%}&post=1" method=post name=frm enctype="multipart/form-data">
<table class="tb_list table_border" width="100%">
<tr>
	<td class="checkbox_list"><!--<input type="checkbox" name="" value="" />--></td>
	<td class="list_td_zw_11">设备自编号</td>
	<td class="list_td_zw_11">设备名称</td>
	<td>厂家编号</td>
	<td class="select_edit">首次启用时间</td>
	<td class="select_edit">设备状态</td>
</tr>
{%foreach from=$data_list item=list%}
<tr>
	<td class="tab_bold"><input type="checkbox" name="comp_no[]" value="{%$list.comp_no%}" /></td>
	<td class="alignleft">{%$list.mc_self_no%}</td>
	<td class="alignleft">{%$list.mc_cn_name%}</td>
	<td class="alignleft">{%$list.comp_no%}</td>
	<td>
		<input type=text class="input_date_edit txt-normal" name="start_time[{%$list.comp_no%}]" id="start_time_{%$list.comp_no%}" maxlength="12" value='{%if $smarty.get.m=='add'%}{%get_first_time comp_no=$list.comp_no%}{%else%}{%$start_time|date_format:"%Y-%m-%d"%}{%/if%}' readonly>
		<script>
			Calendar.setup({
				inputField     :    "start_time_{%$list.comp_no%}",   // id of the input field
				ifFormat       :    "%Y-%m-%d",       // format of the input field
				showsTime      :    false,
				timeFormat     :    "24"
			});
		</script>
	</td>	
	<td>
		<select name="mc_state[{%$list.comp_no%}]" class="select_edit txt-normal">
			<option value="1">完好</option>
			<option value="2">破损</option>
		</select>
	</td>
</tr>
{%/foreach%}
</table>
<div class="pagenation aligncenter">
{%$page_footer%}
</div>
<p class="btn_right">
	<input type=hidden name='allocation_no' id='allocation_no' value='1'><!--调拨数量1-->
	<input type=hidden name='contract_no' id='contract_no' value='{%$contract_no%}'>
	<input type=hidden name='allocation_id' id='allocation_id' value='{%$allocation_id%}'>
	<input type=hidden name='allocation_log_id' id='allocation_log_id' value='{%$allocation_log_id%}'>
	<button type="submit" class="b-default"><span><em>{%if $act eq 'add'%}提交{%else%}更新{%/if%}</em></span></button>
	<button type="button" class="b-default" onclick="history.go(-1)" hidefocus="true"><span><em>返回</em></span></button>
</p>
</form>